package com.bridgeintelligent.tag.remotefile;

import com.bridgeintelligent.tag.remotefile.nas.NasConfigProps;
import com.bridgeintelligent.tag.remotefile.nas.NasHandler;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.context.annotation.Bean;
import org.springframework.context.annotation.Configuration;

@Configuration
public class RemoteFileHandlerFactory {

    @Value("${nas.remoteStorage}")
    String remoteStorage;
    @Value("${nas.localStorage}")
    String localStorage;
    @Value("${nas.returnStorage}")
    String returnStorage;

    @Bean
    public RemoteFileHandler handler() {
        return new NasHandler(new NasConfigProps(remoteStorage, localStorage, returnStorage));
    }
}
